<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理员列表页</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}
</style>
</head>
<#include "../template/template_listPage.ftl">
<body class="list">
	<script type="text/javascript">
	$().ready( function() {
		<#if actionErrors??&&(actionErrors?size > 0)>
			$.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 3000});
			 
		</#if>
	
	});
	</script>
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>管理员列表&nbsp;
		</div>
		<@pageList page=(page!) id="listForm" action="${web_base}/system/admin!list.htm"  query="operatorQuery" isEmpty=true >
		<div class="operateBar">
		<input type="button" class="addButton" onclick="location.href='${web_base}/system/admin!add.htm'" value="添加管理员" /></h1>
			<label>查找:</label>
			用户账号:<input type="text" name="operatorQuery.userId" value="${(operatorQuery.userId)!}">
			<#if roles??>用户角色:<select name="operatorQuery.roleId">
			    <option value="">请选择</option>
				<#list roles as role>
				<option value="${(role.roleId)!}" <#if operatorQuery.roleId??&&operatorQuery.roleId="${(role.roleId)!}"> selected="selected" </#if>>${(role.roleName)!}</option>
				</#list>
				</select>
				</#if>
			<input type="submit" id="searchButton" class="searchButton" value="" />
		</div>
		<table class="listTable">
			<tr>
				<th>
					<span class="" name="account">用户账号</span>
				</th>
				<th>
					<span class="" name="name">用户姓名</span>
				</th>
				<th>
					<span class="" name="roleName">用户角色</span>
				</th>
				<th>
					<span class="" name="tel">手机号码</span>
				</th>
				<th>
					<span class="" name="email">邮箱</span>
				</th>
				<th>
					<span class="" name="lastLoginDate">最后登录时间</span>
				</th>
				<th>
					<span class="" name="lastLoginDate">最后登录IP</span>
				</th>
				<th>
					 操  作
				</th>				
			</tr>
		<#if  page??&&page.list??&&(page.list?size gt 0) >
		<#list page.list as entry>
			<tr>
				<td>
					${(entry.userId)!}
				</td>
				<td>
					${(entry.userName)!}
				</td>
				<td>
					${(entry.roleName)!}
				</td>
				<td>
					${(entry.mobile)!}
				</td>					
				<td>
					${(entry.email)!}
				</td>				
				<td>
				<#if entry.lastLoginTime?exists&&entry.lastLoginTime?is_date>
					${(entry.lastLoginTime)?string("yyyy-MM-dd HH:mm:dd")}
					</#if>
				</td>	
				<td>
					${(entry.lastLoginIp)!}
				</td>
				<td>
					<a href="${web_base}/system/admin!reset.htm?userId=${entry.userId}" title="重置">[重置]</a>
					<a href="${web_base}/system/admin!toEdit.htm?userId=${entry.userId}" title="编辑">[编辑]</a>
					<a href="${web_base}/system/admin!delete.htm?userId=${entry.userId}" title="删除">[删除]</a>
					<br/>
				</td>
			</tr>
		</#list>
		<#else>
		    <tr><td colspan="9">
			<div class="noRecord">
				没有找到任何记录!
			</div>	
			</td></tr>
		</#if>
		</table>
	</@pageList>
	</div>
</body>
